#!/bin/bash

UNI_FORWARD=$(cat $1 | grep UNICAST | sed 's/^.*\(LOG_.*\).*$/\1/g' | grep FORW | sort -u | wc -l)
UNI_RECEIVE=$(cat $1 | grep UNICAST | sed 's/^.*\(LOG_.*\).*$/\1/g' | grep RECE | sort -u | wc -l)
MULTI_FORWARD=$(cat $1 | grep MULTICAST | sed 's/^.*\(LOG_.*\).*$/\1/g' | grep FORW | sort -u | wc -l)
MULTI_RECEIVE=$(cat $1 | grep MULTICAST | sed 's/^.*\(LOG_.*\).*$/\1/g' | grep RECE | sort -u | wc -l)

echo "Unicast forward: "$UNI_FORWARD
echo "Unicast receive: "$UNI_RECEIVE
echo "Unicast total: "$(($UNI_FORWARD + $UNI_RECEIVE))
echo "Multicast forward: "$MULTI_FORWARD
echo "Multicast receive: "$MULTI_RECEIVE
echo "Multicast total: "$(($MULTI_FORWARD + $MULTI_RECEIVE))

